attribute vec4 vPos;			//Vertex Position
attribute vec3 vNor;			//Vertex Normal
attribute vec2 vUV;				//Vertex UV Coordinates

uniform mat4 modelView;			//ModelView Matrix
uniform mat4 perspective;		//Perspective Matrix
uniform vec4 lightPos;	//LightPosition in eyespace(transformed to eyespace on CPU)

varying vec2 vUVOut;
varying vec3 lightDir;

void main(void)
{    
	vec4 rawPos = modelView * vPos;			//vertex eyespace position
	lightDir = vec3(lightPos - rawPos);
	gl_Position = perspective * rawPos;		//perform perspective divide
	vUVOut = vUV * vec2(1.0, -1.0);//invert v coordinates because Blender is retarded and bottom of image is 1.0
	
}

